<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Newsbag中文版',
	'language'=>'zh_cn',
	//'catchAllRequest' => array('nc/notice','p1'=>'newsbag','p2'=>'chuncheng'),

	// preloading 'log' component
	'preload'=>array('log'),
	//'theme' => 'spricity',

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
	),
	'modules'=>array(
		'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'gii',
		),
	),
	//'catchAllRequest' => array('/debug/index','param1'=>'value1','param2'=>'value2'),

	'defaultController'=>'news',

	// application components
	'components'=>array(
		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>true,
			'loginUrl'=>'/account/login',
			'returnUrl'=>'/',
		),
		/*
		'log'=>array(
            'class'=>'CLogRouter',
            'routes'=>array(
                array(
                    'class'=>'CFileLogRoute',
                    'levels'=>'trace, info',
                    'categories'=>'system.*',
                ),
                array(
                    'class'=>'CEmailLogRoute',
                    'levels'=>'error, warning',
                    'emails'=>'admin@example.com',
                ),
            ),
        ),
*/
		'errorHandler'=>array(
			// use 'site/error' action to display errors
     //       'errorAction'=>'news/error',
        ),

        'urlManager'=>array(
        	'urlFormat'=>'path',
			'showScriptName'=>false,
        	'rules'=>array(
        		'news/<id:\d+>/*'=>'news/view',
				'tag/<id:\d+>/<tag:.*?>'=>'tag/index',
        		'tag/<tag:.*?>'=>'tag/index',
				'upper/<id:\d+>/*'=>'upper/index',
				'wai/<id:\d+>/<link:.*?>/<title:.*?>'=>'wai/index',
				'account/<id:\d+>/*'=>'account/sure',
				'rss/tag/<tag:.*?>'=>'rss/tag',
				'rss/user/<user:.*?>'=>'rss/user',
        		'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
        	),
        ),
		

	),
);